package collection;

import java.util.ArrayList;
import java.util.Collection;

//集合框架
public class CollectionDemo {
    public static void main(String[] args) {
        Collection c=new ArrayList();
        c.add("nihao");
        c.add(2);
        c.add("san");
        c.add('d');
        System.out.println(c);

        int size=c.size();
        System.out.println(size);


        boolean isEmpty=c.isEmpty();
        System.out.println("是否为空集"+isEmpty);

        c.clear();
        System.out.println("是否为空集"+c.isEmpty());
    }
}
